package com.seven.z7.logviewer.controls;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;

import javax.swing.JMenuBar;
import javax.xml.parsers.ParserConfigurationException;

import org.xml.sax.SAXException;

import com.seven.z7.logviewer.xml.XMLMenuParser;

/**
 * 
 * @author aprokofjev
 * 
 */
@SuppressWarnings("serial")
public class Menu extends JMenuBar implements ActionListener {

	private ActionListener mFrameActionListener;

	public Menu(ActionListener listener, File file) throws ParserConfigurationException, IOException, SAXException {
		mFrameActionListener = listener;
		new XMLMenuParser(file, this).parse();
	}

	public void actionPerformed(ActionEvent e) {
		mFrameActionListener.actionPerformed(e);
	}

}
